﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;

namespace CenterDateAchieve.ControlAadpter
{
    public class AdapterBase:IControlAdapter
    {
        protected Control control_;
        public AdapterBase(Control ctrl)
        {
            control_ = ctrl;
        }
        #region IControlAdapter 成员

        public virtual object Get()
        {
            return control_.Text;
        }

        public virtual string ControlName
        {
            get { return control_.Name; }
        }

        #endregion


        public void Set(object obj)
        {
         
            this.control_.Text = Convert.ToString(obj);
         
        }

        
    }
}
